3.1.60 \(\int \frac {\sec ^4(c+d x)}{a+a \sin (c+d x)} \, dx\) [60]

Optimal. Leaf size=62 \[ -\frac {\sec ^3(c+d x)}{5 d (a+a \sin (c+d x))}+\frac {4 \tan (c+d x)}{5 a d}+\frac {4 \tan ^3(c+d x)}{15 a d} \]

[Out]

-1/5*sec(d*x+c)^3/d/(a+a*sin(d*x+c))+4/5*tan(d*x+c)/a/d+4/15*tan(d*x+c)^3/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2751, 3852} \begin {gather*} \frac {4 \tan ^3(c+d x)}{15 a d}+\frac {4 \tan (c+d x)}{5 a d}-\frac {\sec ^3(c+d x)}{5 d (a \sin (c+d x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a + a*Sin[c + d*x]),x]

[Out]

-1/5*Sec[c + d*x]^3/(d*(a + a*Sin[c + d*x])) + (4*Tan[c + d*x])/(5*a*d) + (4*Tan[c + d*x]^3)/(15*a*d)

Rule 2751

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b*(g*C
os[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*Simplify[2*m + p + 1])), x] + Dist[Simplify[m + p + 1]/(a*
Simplify[2*m + p + 1]), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g, m
, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[Simplify[m + p + 1], 0] && NeQ[2*m + p + 1, 0] &&  !IGtQ[m, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {\sec ^4(c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac {\sec ^3(c+d x)}{5 d (a+a \sin (c+d x))}+\frac {4 \int \sec ^4(c+d x) \, dx}{5 a}\\ &=-\frac {\sec ^3(c+d x)}{5 d (a+a \sin (c+d x))}-\frac {4 \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 a d}\\ &=-\frac {\sec ^3(c+d x)}{5 d (a+a \sin (c+d x))}+\frac {4 \tan (c+d x)}{5 a d}+\frac {4 \tan ^3(c+d x)}{15 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 66, normalized size = 1.06 \begin {gather*} -\frac {\sec ^3(c+d x) (2 \cos (2 (c+d x))+\cos (4 (c+d x))-2 (3 \sin (c+d x)+\sin (3 (c+d x))))}{15 a d (1+\sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a + a*Sin[c + d*x]),x]

[Out]

-1/15*(Sec[c + d*x]^3*(2*Cos[2*(c + d*x)] + Cos[4*(c + d*x)] - 2*(3*Sin[c + d*x] + Sin[3*(c + d*x)])))/(a*d*(1
 + Sin[c + d*x]))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(129\) vs. \(2(56)=112\).
time = 0.18, size = 130, normalized size = 2.10

method result size
risch \(-\frac {16 \left (6 \,{\mathrm e}^{3 i \left (d x +c \right )}+2 i {\mathrm e}^{2 i \left (d x +c \right )}+2 \,{\mathrm e}^{i \left (d x +c \right )}+i\right )}{15 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{5} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} d a}\) \(74\)
derivativedivides \(\frac {-\frac {2}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {5}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) \(130\)
default \(\frac {-\frac {2}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {5}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) \(130\)
norman \(\frac {\frac {10 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}+\frac {2}{5 a d}-\frac {2 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {2 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {14 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d a}-\frac {6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{5 d a}+\frac {2 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {26 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}\) \(168\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/d/a*(-1/5/(tan(1/2*d*x+1/2*c)+1)^5+1/2/(tan(1/2*d*x+1/2*c)+1)^4-5/6/(tan(1/2*d*x+1/2*c)+1)^3+3/4/(tan(1/2*d*
x+1/2*c)+1)^2-11/16/(tan(1/2*d*x+1/2*c)+1)-1/12/(tan(1/2*d*x+1/2*c)-1)^3-1/8/(tan(1/2*d*x+1/2*c)-1)^2-5/16/(ta
n(1/2*d*x+1/2*c)-1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 294 vs. \(2 (56) = 112\).
time = 0.36, size = 294, normalized size = 4.74 \begin {gather*} \frac {2 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {21 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {13 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {25 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {5 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - 3\right )}}{15 \, {\left (a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {6 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {6 \, a \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {2 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {2 \, a \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

2/15*(9*sin(d*x + c)/(cos(d*x + c) + 1) + 21*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 13*sin(d*x + c)^3/(cos(d*x
+ c) + 1)^3 - 25*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 5*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 15*sin(d*x + c)
^6/(cos(d*x + c) + 1)^6 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - 3)/((a + 2*a*sin(d*x + c)/(cos(d*x + c) + 1
) - 2*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 6*a*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 6*a*sin(d*x + c)^5/(co
s(d*x + c) + 1)^5 + 2*a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 2*a*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - a*sin(
d*x + c)^8/(cos(d*x + c) + 1)^8)*d)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 75, normalized size = 1.21 \begin {gather*} -\frac {8 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} - 4 \, {\left (2 \, \cos \left (d x + c\right )^{2} + 1\right )} \sin \left (d x + c\right ) - 1}{15 \, {\left (a d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )^{3}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/15*(8*cos(d*x + c)^4 - 4*cos(d*x + c)^2 - 4*(2*cos(d*x + c)^2 + 1)*sin(d*x + c) - 1)/(a*d*cos(d*x + c)^3*si
n(d*x + c) + a*d*cos(d*x + c)^3)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{4}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a+a*sin(d*x+c)),x)

[Out]

Integral(sec(c + d*x)**4/(sin(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (56) = 112\).
time = 6.21, size = 119, normalized size = 1.92 \begin {gather*} -\frac {\frac {5 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 13\right )}}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} + \frac {165 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 480 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 650 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 400 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 113}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{120 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/120*(5*(15*tan(1/2*d*x + 1/2*c)^2 - 24*tan(1/2*d*x + 1/2*c) + 13)/(a*(tan(1/2*d*x + 1/2*c) - 1)^3) + (165*t
an(1/2*d*x + 1/2*c)^4 + 480*tan(1/2*d*x + 1/2*c)^3 + 650*tan(1/2*d*x + 1/2*c)^2 + 400*tan(1/2*d*x + 1/2*c) + 1
13)/(a*(tan(1/2*d*x + 1/2*c) + 1)^5))/d

________________________________________________________________________________________

Mupad [B]
time = 5.94, size = 125, normalized size = 2.02 \begin {gather*} -\frac {2\,\left (15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-25\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+13\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-3\right )}{15\,a\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^4*(a + a*sin(c + d*x))),x)

[Out]

-(2*(9*tan(c/2 + (d*x)/2) + 21*tan(c/2 + (d*x)/2)^2 + 13*tan(c/2 + (d*x)/2)^3 - 25*tan(c/2 + (d*x)/2)^4 - 5*ta
n(c/2 + (d*x)/2)^5 + 15*tan(c/2 + (d*x)/2)^6 + 15*tan(c/2 + (d*x)/2)^7 - 3))/(15*a*d*(tan(c/2 + (d*x)/2) - 1)^
3*(tan(c/2 + (d*x)/2) + 1)^5)

________________________________________________________________________________________